package nlp.helpers;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Collection;
import java.util.Vector;

/**
 * @author lgorbliuk
 */ 

public class LectorArchivos {

	public static Collection getLines(String filename){
	
		Collection lineas = new Vector();
		
		try {
			BufferedReader reader = new BufferedReader(new FileReader(filename));
			String linea= reader.readLine(); 
			while(linea!=null) { 
				lineas.add(linea); 
				linea= reader.readLine(); 
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		} catch (IOException e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		} 

		return lineas;
	
	}
}
